<!DOCTYPE html>
<html>

<head>
    <title>用户等级配置表</title>
    <#include "/header.html">
</head>

<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <#if shiro.hasPermission( "member:configmemberlevel:save")>
            <a class="btn btn-primary btn-sm" @click="add">
                <i class="fa fa-plus"></i>&nbsp;添加等级</a>
            </#if>
            <!--<#if shiro.hasPermission( "member:configmemberlevel:update")>-->
            <!--<a class="btn btn-primary btn-sm" @click="update">-->
                <!--<i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>-->
            <!--</#if>-->
            <#if shiro.hasPermission( "member:configmemberlevel:delete")>
            <a class="btn btn-primary btn-sm" @click="del">
                    <i class="fa fa-trash-o"></i>&nbsp;删除等级</a>
            </#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <!--编辑start-->
    <div v-show="showListUpdate" class="panel panel-default" align="center">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-3 control-label">等级名称</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control input-sm" v-model="configMemberLevel.name" placeholder="等级名称"/>
                    <span style="color: red" class="pull-left">请填写相应的等级名称</span>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-3 control-label">会员折扣率</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control input-sm" v-model="configMemberLevel.disCount" placeholder="会员折扣率"/>
                    <span style="color: red" class="pull-left">如果输入0.8,表示该会员等级以销售价的8折购买,有效范围0-1</span>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-3 control-label">所需积分</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control input-sm" v-model="configMemberLevel.point" placeholder="所需积分"/>
                    <span style="color: red" class="pull-left">当会员积分到达此标准后自动升级为当前等级</span>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary btn-sm pull-left" @click="saveOrUpdate" value="确定"/> &nbsp;&nbsp;
                <input type="button" class="btn btn-warning btn-sm " @click="reload" value="返回"/>
            </div>
        </form>
    </div>
    <!--编辑end-->

</div>
<script src="${request.contextPath}/statics/js/modules/member/configmemberlevel.js?_${.now?long}"></script>
</body>

</html>
